3.1534 \(\int \frac{1}{(a-b x) (a+b x)} \, dx\)

Optimal. Leaf size=14 \[ \frac{\tanh ^{-1}\left (\frac{b x}{a}\right )}{a b} \]

[Out]

ArcTanh[(b*x)/a]/(a*b)

________________________________________________________________________________________

Rubi [A]  time = 0.0080893, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {35, 208} \[ \frac{\tanh ^{-1}\left (\frac{b x}{a}\right )}{a b} \]

Antiderivative was successfully verified.

[In]

Int[1/((a - b*x)*(a + b*x)),x]

[Out]

ArcTanh[(b*x)/a]/(a*b)

Rule 35

Int[1/(((a_) + (b_.)*(x_))*((c_) + (d_.)*(x_))), x_Symbol] :> Int[1/(a*c + b*d*x^2), x] /; FreeQ[{a, b, c, d},
 x] && EqQ[b*c + a*d, 0]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{1}{(a-b x) (a+b x)} \, dx &=\int \frac{1}{a^2-b^2 x^2} \, dx\\ &=\frac{\tanh ^{-1}\left (\frac{b x}{a}\right )}{a b}\\ \end{align*}

Mathematica [A]  time = 0.0035169, size = 14, normalized size = 1. \[ \frac{\tanh ^{-1}\left (\frac{b x}{a}\right )}{a b} \]

Antiderivative was successfully verified.

[In]

Integrate[1/((a - b*x)*(a + b*x)),x]

[Out]

ArcTanh[(b*x)/a]/(a*b)

________________________________________________________________________________________

Maple [B]  time = 0.005, size = 32, normalized size = 2.3 \begin{align*}{\frac{\ln \left ( bx+a \right ) }{2\,ab}}-{\frac{\ln \left ( bx-a \right ) }{2\,ab}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(-b*x+a)/(b*x+a),x)

[Out]

1/2/b/a*ln(b*x+a)-1/2/b/a*ln(b*x-a)

________________________________________________________________________________________

Maxima [B]  time = 1.18131, size = 42, normalized size = 3. \begin{align*} \frac{\log \left (b x + a\right )}{2 \, a b} - \frac{\log \left (b x - a\right )}{2 \, a b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-b*x+a)/(b*x+a),x, algorithm="maxima")

[Out]

1/2*log(b*x + a)/(a*b) - 1/2*log(b*x - a)/(a*b)

________________________________________________________________________________________

Fricas [A]  time = 1.30306, size = 55, normalized size = 3.93 \begin{align*} \frac{\log \left (b x + a\right ) - \log \left (b x - a\right )}{2 \, a b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-b*x+a)/(b*x+a),x, algorithm="fricas")

[Out]

1/2*(log(b*x + a) - log(b*x - a))/(a*b)

________________________________________________________________________________________

Sympy [B]  time = 0.135626, size = 20, normalized size = 1.43 \begin{align*} - \frac{\frac{\log{\left (- \frac{a}{b} + x \right )}}{2} - \frac{\log{\left (\frac{a}{b} + x \right )}}{2}}{a b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-b*x+a)/(b*x+a),x)

[Out]

-(log(-a/b + x)/2 - log(a/b + x)/2)/(a*b)

________________________________________________________________________________________

Giac [B]  time = 2.50861, size = 45, normalized size = 3.21 \begin{align*} \frac{\log \left ({\left | b x + a \right |}\right )}{2 \, a b} - \frac{\log \left ({\left | b x - a \right |}\right )}{2 \, a b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-b*x+a)/(b*x+a),x, algorithm="giac")

[Out]

1/2*log(abs(b*x + a))/(a*b) - 1/2*log(abs(b*x - a))/(a*b)